import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import store from './store/index.js'
import uView from '@/uni_modules/uview-ui'
import config from '@/config.js'
import filters from '@/utils/filters.js'

import me_scoket from '@/utils/web_scket.js'

Vue.use(uView)

// 全局过滤器
for (let key in filters) {
	Vue.filter(key, filters[key])
}

// 全局mixins
import public_fun from '@/mixins/public.js'
Vue.mixin(public_fun)

//挂载公共方法
import publicfun from './utils/public.js'
Vue.prototype.$publicfun = publicfun;

Vue.prototype.$me_scoket = me_scoket
Vue.prototype.$store = store
Vue.prototype.$beasUrl = config.serverIp
Vue.prototype.$newbeasUrl = config.new_beas
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif